import { FormSchema } from '@/components/Form';

export const columns = [
  {
    type: 'selection',
    key: 'selection',
  },

  {
    title: '主播ID',
    key: 'id',
  },
  {
    title: '主播名称',
    key: 'name',
  },
  {
    title: '用户ID',
    key: 'userId',
  },
  {
    title: 'ios红包口令',
    key: 'iosCommand',
  },
  {
    title: '创建时间',
    key: 'createTime',
  },
];

export const addCloumns: FormSchema[] = [
  {
    field: 'name',
    component: 'NInput',
    label: '主播名称',
    labelMessage: '提示',
    giProps: {
      span: 1,
    },
    componentProps: {
      placeholder: '请输入主播名称',
    },
    rules: [{ required: true, message: '请输入主播名称', trigger: ['blur'] }],
  },
  {
    field: 'userId',
    component: 'NInput',
    label: '绑定用户ID',
    componentProps: {
      type: 'input',
      placeholder: '请输入要绑定的用户ID(多个用,分隔)',
    },
  },
  {
    field: 'iosCommand',
    label: 'ios红包口令',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入ios红包口令',
    },
  },
  {
    field: 'username',
    label: '主播后台账号',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入账号',
    },
  },
  {
    field: 'password',
    label: '主播后台密码',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入密码',
    },
  },
];

export const editCloumns: FormSchema[] = [
  {
    field: 'name',
    component: 'NInput',
    label: '主播名称',
    labelMessage: '提示',
    giProps: {
      span: 1,
    },
    componentProps: {
      placeholder: '请输入主播名称',
    },
    rules: [{ required: true, message: '请输入主播名称', trigger: ['blur'] }],
  },

  {
    field: 'userId',
    component: 'NInput',
    label: '绑定用户ID',
    componentProps: {
      type: 'input',
      placeholder: '请输入要绑定的用户ID(多个用,分隔)',
    },
  },
  {
    field: 'iosCommand',
    label: 'ios红包口令',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入ios红包口令',
    },
  },
  {
    field: 'username',
    label: '主播后台账号',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入账号',
    },
  },
  {
    field: 'password',
    label: '主播后台密码',
    component: 'NInput',
    componentProps: {
      type: 'input',
      placeholder: '请输入密码',
    },
  },
];
